Release 10.1A: OpenEdge Getting Started:
Object-oriented Programming
Using the COMPILER system handle
The
COMPILERsystem handle provides the following attributes, specifically for compiling class files:MULTI-COMPILE attribute
The
MULTI-COMPILEattribute on theCOMPILERsystem handle is a read-write attribute that improves the performance of the compiler in certain situations. Normally, the compiler compiles all class files in a class hierarchy. The compiler does not try to determine if the files in the class hierarchy have changed since the last compilation.To improve performance, you can set the
MULTI-COMPILEattribute toTRUE. This causes the compiler to only compile those class files within a class hierarchy that it has not already compiled sinceMULTI-COMPILEwas set toTRUE. Your build application can set this attribute toTRUEwhen you are building all class files within an application, and no files are going to be modified during the process. While this attribute isTRUE, the Progress session caches class and interface compilations such that when a class or interface is thereafter compiled, Progress will not recompile any classes or interfaces that are in the cache. Progress flushes this cache whenMULTI-COMPILEis set toFALSE.The following example demonstrates the use of the
MULTI-COMPILEattribute:
In this example, any class files that have been compiled during the compilation of
Caution: Leaving this attribute set toacme.myObjs.CustObj.clsand also participate in the class hierarchy ofacme.myObjs.NECustomer.cls, are not compiled again during the compilation ofacme.myObjs.NECustomer.cls.TRUEcauses the Progress session to ignore any changes to classes that have already been compiled during the session while the attribute was set.CLASS-TYPE attribute
The
CLASS-TYPEattribute on theCOMPILERsystem handle is a read-only attribute that identifies the class type name of the class file that was compiled by the most recently executedCOMPILEstatement. For example, after the application compiles a class fileCustObj.clsthat contains theCLASSstatement,CLASSacme.myObjs.CustObj, theCOMPILER:CLASS-TYPEattribute contains the string,"acme.myObjs.CustObj". If the last file compiled with theCOMPILEstatement is not a class file, this attribute is set to the empty string ("").
|
Copyright © 2005 Progress Software Corporation www.progress.com Voice: (781) 280-4000 Fax: (781) 280-4095 |